<template>
  <div class="q-table-filter">
    <!-- <dropdown :items="filters" @select="select" :parse="parse" :value="value"> -->
      <slot></slot>
      <i class="q-icon-filter"></i>
    <!-- </dropdown> -->
  </div>
</template>

<script>
// import dropdown from '../../dropdown';

export default {
  name: 'qTableFilter',
  components: {
    // dropdown
  },
  props: {
    filters: {
      default: () => []
    },
    value: {
      type: String,
      default: ''
    },
    parse: {
      type: Function,
      default(item) {
        return item.title;
      }
    }
  },
  watch: {
    value(v) {
      this.$emit('update:value', v);
    }
  },
  methods: {
    select(item) {
      this.$emit('select', item);
    }
  }
};
</script>
